package com.qinggeng.project.system.domain;

import java.sql.Time;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.qinggeng.framework.aspectj.lang.annotation.Excel;
import lombok.Data;
import com.qinggeng.framework.web.domain.BaseEntity;

/**
 * 系统活动对象 sys_activity
 *
 * @author smallfish
 * @date 2021-01-12
 */
@Data
public class SysActivity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long id;

    /** 活动标题 */
    @Excel(name = "活动标题")
    private String name;

    /** 活动关键词 */
    @Excel(name = "活动关键词")
    private String activityKey;

    /** 活动图片地址 */
    @Excel(name = "活动图片地址")
    private String url;

    /** 界面编码 */
    @Excel(name = "界面编码")
    private String code;

    /** 活动参数 */
    @Excel(name = "活动参数")
    private String arg;

    /** 跳转类型 */
    @Excel(name = "跳转类型")
    private String isReturn;

    /** 排序 */
    @Excel(name = "排序")
    private Integer sort;

    /** 活动礼品Id*/
    @Excel(name = "活动礼品Id")
    private String activityGiftId;

    /** 是否开启（0=不开启，1=开启，2=分时段开启） */
    @Excel(name = "是否开启", readConverterExp = "0==不开启，1=开启，2=分时段开启")
    private Integer isActivity;

    /** 开始时间 */
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Time beginTime;

    /** 结束时间 */
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Time endTime;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("name", getName())
            .append("activityKey", getActivityKey())
            .append("url", getUrl())
            .append("code", getCode())
            .append("arg", getArg())
            .append("isReturn", getIsReturn())
            .append("sort", getSort())
            .append("activityGiftId", getActivityGiftId())
            .append("isActivity", getIsActivity())
            .append("beginTime", getBeginTime())
            .append("endTime", getEndTime())
            .toString();
    }
}
